
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>常见函数 · MLSQL Stack 文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-footer-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../process/" />
    
    
    <link rel="prev" href="http.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    MLSQL Stack
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">产品信息</li>
        
        
    
        <li class="chapter " data-level="2.1" >
            
                <a target="_blank" href="http://blog.mlsql.tech">
            
                    
                    MLSQL官方博客
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" >
            
                <a target="_blank" href="http://blog.mlsql.tech/blog/demo.html">
            
                    
                    MLSQL Stack体验站点
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">版本以及部署</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../release-notes/">
            
                <a href="../release-notes/">
            
                    
                    所有版本
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="../release-notes/version.html">
            
                <a href="../release-notes/version.html">
            
                    
                    MLSQL Stack版本管理策略
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="../release-notes/2.0.1.html">
            
                <a href="../release-notes/2.0.1.html">
            
                    
                    MLSQL Stack 2.0.1版发布
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="../release-notes/2.0.0.html">
            
                <a href="../release-notes/2.0.0.html">
            
                    
                    MLSQL Stack 2.0.0版发布
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="../release-notes/2.0.1-bug.html">
            
                <a href="../release-notes/2.0.1-bug.html">
            
                    
                    MLSQL Stack 2.0.1 Bug 合集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.5" data-path="../release-notes/2.0.0-bug.html">
            
                <a href="../release-notes/2.0.0-bug.html">
            
                    
                    MLSQL Stack 2.0.0 Bug 合集
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../howtouse/">
            
                <a href="../howtouse/">
            
                    
                    基本安装
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.2.1" data-path="../howtouse/install.html">
            
                <a href="../howtouse/install.html">
            
                    
                    MLSQL Console 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.2" data-path="../howtouse/setup.html">
            
                <a href="../howtouse/setup.html">
            
                    
                    MLSQL Console 初始配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.3" data-path="../howtouse/engine/">
            
                <a href="../howtouse/engine/">
            
                    
                    MLSQL Engine 安装与配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.2.3.1" data-path="../howtouse/engine/configuration.html">
            
                <a href="../howtouse/engine/configuration.html">
            
                    
                    启动参数详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.3.2" data-path="../howtouse/engine/deploy.html">
            
                <a href="../howtouse/engine/deploy.html">
            
                    
                    Local
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.3.3" data-path="../howtouse/engine/k8s_deploy.html">
            
                <a href="../howtouse/engine/k8s_deploy.html">
            
                    
                    K8s部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.3.4" data-path="../howtouse/engine/yarn_deploy.html">
            
                <a href="../howtouse/engine/yarn_deploy.html">
            
                    
                    Yarn部署
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">操作指南</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../analysis-workshop/">
            
                <a href="../analysis-workshop/">
            
                    
                    Analysis Workshop使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1.1" data-path="../analysis-workshop/interface.html">
            
                <a href="../analysis-workshop/interface.html">
            
                    
                    软件界面介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="../analysis-workshop/admin-engine.html">
            
                <a href="../analysis-workshop/admin-engine.html">
            
                    
                    Admin管理后台之Engine配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.3" data-path="../analysis-workshop/simple-example.html">
            
                <a href="../analysis-workshop/simple-example.html">
            
                    
                    简单使用示例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.4" data-path="../analysis-workshop/pivot.html">
            
                <a href="../analysis-workshop/pivot.html">
            
                    
                    透视表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.5" data-path="../analysis-workshop/dash.html">
            
                <a href="../analysis-workshop/dash.html">
            
                    
                    可视化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.6" data-path="../analysis-workshop/window.html">
            
                <a href="../analysis-workshop/window.html">
            
                    
                    使用窗口进行数据分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.7" data-path="../analysis-workshop/complex-filter.html">
            
                <a href="../analysis-workshop/complex-filter.html">
            
                    
                    复杂组合条件过滤
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.8" data-path="../analysis-workshop/ds-mysql.html">
            
                <a href="../analysis-workshop/ds-mysql.html">
            
                    
                    MySQL数据库配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.9" data-path="../analysis-workshop/json-fields.html">
            
                <a href="../analysis-workshop/json-fields.html">
            
                    
                    Json字段展开
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.10" data-path="../analysis-workshop/aw-plugin.html">
            
                <a href="../analysis-workshop/aw-plugin.html">
            
                    
                    用MLSQL为Analysis Workshop开发插件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../console/">
            
                <a href="../console/">
            
                    
                    MLSQL语言控制台使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.2.1" data-path="../console/interface.html">
            
                <a href="../console/interface.html">
            
                    
                    界面简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2.2" data-path="../console/simple-example.html">
            
                <a href="../console/simple-example.html">
            
                    
                    简单使用示例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">MLSQL语法以及编程教程</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../lang/">
            
                <a href="../lang/">
            
                    
                    MLSQL语法手册
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1.1" data-path="../lang/set.html">
            
                <a href="../lang/set.html">
            
                    
                    Set语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.2" data-path="../lang/load.html">
            
                <a href="../lang/load.html">
            
                    
                    Load语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.3" data-path="../lang/select.html">
            
                <a href="../lang/select.html">
            
                    
                    Select语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.4" data-path="../lang/et_statement.html">
            
                <a href="../lang/et_statement.html">
            
                    
                    Train/Run/Predict语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.5" data-path="../lang/register.html">
            
                <a href="../lang/register.html">
            
                    
                    Register语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.6" data-path="../lang/save.html">
            
                <a href="../lang/save.html">
            
                    
                    Save语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.7" data-path="../lang/macro.html">
            
                <a href="../lang/macro.html">
            
                    
                    宏语法(命令行)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.8" data-path="../lang/include.html">
            
                <a href="../lang/include.html">
            
                    
                    Include语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.9" >
            
                <a target="_blank" href="http://blog.mlsql.tech/blog/mlsql-ifelse.html">
            
                    
                    分支语句
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.10" data-path="../lang/analyze.html">
            
                <a href="../lang/analyze.html">
            
                    
                    MLSQL语法解析接口
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../batch/">
            
                <a href="../batch/">
            
                    
                    MLSQL批处理编程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.2.1" data-path="../datahouse/">
            
                <a href="../datahouse/">
            
                    
                    MLSQL数仓/数据湖使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.2.1.1" data-path="../datahouse/hive.html">
            
                <a href="../datahouse/hive.html">
            
                    
                    Hive加载和存储
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.1.2" data-path="../datahouse/delta.html">
            
                <a href="../datahouse/delta.html">
            
                    
                    Delta加载和存储以及流式支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.1.3" data-path="../datahouse/binlog.html">
            
                <a href="../datahouse/binlog.html">
            
                    
                    MySQL Binlog同步
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.2.2" data-path="../datasource/">
            
                <a href="../datasource/">
            
                    
                    加载和存储多种数据源
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.2.2.1" data-path="../datasource/jdbc.html">
            
                <a href="../datasource/jdbc.html">
            
                    
                    JDBC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.2.2" data-path="../datasource/es.html">
            
                <a href="../datasource/es.html">
            
                    
                    ElasticSearch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.2.3" data-path="../datasource/solr.html">
            
                <a href="../datasource/solr.html">
            
                    
                    Solr
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.2.4" data-path="../datasource/hbase.html">
            
                <a href="../datasource/hbase.html">
            
                    
                    HBase
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.2.5" data-path="../datasource/mongodb.html">
            
                <a href="../datasource/mongodb.html">
            
                    
                    MongoDB
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.2.6" data-path="../datasource/file.html">
            
                <a href="../datasource/file.html">
            
                    
                    Parquet/Json/Text/Xml/Csv
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.2.7" data-path="../datasource/mlsql_source.html">
            
                <a href="../datasource/mlsql_source.html">
            
                    
                    jsonStr/script/mlsqlAPI/mlsqlConf
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.2.3" data-path="./">
            
                <a href="./">
            
                    
                    内置常见UDF
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.2.3.1" data-path="http.html">
            
                <a href="http.html">
            
                    
                    http请求
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="5.2.3.2" data-path="vec.html">
            
                <a href="vec.html">
            
                    
                    常见函数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.2.4" data-path="../process/">
            
                <a href="../process/">
            
                    
                    一些有用的内置ET
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.2.4.1" data-path="../process/estimator_transformer/TreeBuildExt.html">
            
                <a href="../process/estimator_transformer/TreeBuildExt.html">
            
                    
                    计算复杂的父子关系
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.4.2" data-path="../process/estimator_transformer/RepartitionExt.html">
            
                <a href="../process/estimator_transformer/RepartitionExt.html">
            
                    
                    改变表的分区数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.4.3" data-path="../process/estimator_transformer/SendMessage.html">
            
                <a href="../process/estimator_transformer/SendMessage.html">
            
                    
                    如何发送邮件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.4.4" data-path="../process/estimator_transformer/mlsql-watcher.html">
            
                <a href="../process/estimator_transformer/mlsql-watcher.html">
            
                    
                    数据采集组件mlsql-watcher使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="../stream/">
            
                <a href="../stream/">
            
                    
                    MLSQL流编程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.3.1" data-path="../stream/datasource.html">
            
                <a href="../stream/datasource.html">
            
                    
                    Kafka和MockStream
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3.2" data-path="../stream/kakfa_tool.html">
            
                <a href="../stream/kakfa_tool.html">
            
                    
                    MLSQL Kafka小工具集锦
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3.3" data-path="../stream/data_convert.html">
            
                <a href="../stream/data_convert.html">
            
                    
                    自动将Kafka中的JSON数据展开为表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3.4" data-path="../stream/query_kafka.html">
            
                <a href="../stream/query_kafka.html">
            
                    
                    如何高效的AdHoc查询Kafka
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3.5" data-path="../stream/callback.html">
            
                <a href="../stream/callback.html">
            
                    
                    如何设置流式计算回调
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3.6" data-path="../stream/batch.html">
            
                <a href="../stream/batch.html">
            
                    
                    如何对流的结果以批的形式保存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3.7" data-path="../stream/window_wartermark.html">
            
                <a href="../stream/window_wartermark.html">
            
                    
                    window/watermark的使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3.8" data-path="../stream/stream_mysql_update.html">
            
                <a href="../stream/stream_mysql_update.html">
            
                    
                    如何使用MLSQL流式更新MySQL数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3.9" data-path="../stream/web_console.html">
            
                <a href="../stream/web_console.html">
            
                    
                    流结果输出到WebConsole
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="../ml/">
            
                <a href="../ml/">
            
                    
                    MLSQL机器学习编程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.4.1" data-path="../feature/">
            
                <a href="../feature/">
            
                    
                    特征工程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.4.1.1" data-path="../feature/nlp.html">
            
                <a href="../feature/nlp.html">
            
                    
                    文本向量化
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.4.1.1.1" data-path="../feature/tfidf.html">
            
                <a href="../feature/tfidf.html">
            
                    
                    TFIDF
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.1.1.2" data-path="../feature/word2vec.html">
            
                <a href="../feature/word2vec.html">
            
                    
                    Word2Vec
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.4.1.2" data-path="../feature/scale.html">
            
                <a href="../feature/scale.html">
            
                    
                    特征平滑
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.1.3" data-path="../feature/normalize.html">
            
                <a href="../feature/normalize.html">
            
                    
                    归一化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.1.4" data-path="../feature/confusion_matrix.html">
            
                <a href="../feature/confusion_matrix.html">
            
                    
                    混淆矩阵
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.1.5" data-path="../feature/some_extract.html">
            
                <a href="../feature/some_extract.html">
            
                    
                    QQ/电话/邮件抽取
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.1.6" data-path="../feature/discretizer/">
            
                <a href="../feature/discretizer/">
            
                    
                    离散化
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.4.1.6.1" data-path="../feature/discretizer/bucketizer.html">
            
                <a href="../feature/discretizer/bucketizer.html">
            
                    
                    Bucketizer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.1.6.2" data-path="../feature/discretizer/quantile.html">
            
                <a href="../feature/discretizer/quantile.html">
            
                    
                    Quantile
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.4.1.7" data-path="../feature/vecmap.html">
            
                <a href="../feature/vecmap.html">
            
                    
                    Map转化为向量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.1.8" data-path="../feature/rate_sample.html">
            
                <a href="../feature/rate_sample.html">
            
                    
                    数据集切分
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.4.2" data-path="../python/">
            
                <a href="../python/">
            
                    
                    MLSQL Python支持
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.4.2.1" data-path="../python/env.html">
            
                <a href="../python/env.html">
            
                    
                    环境依赖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.2.2" data-path="../python/etl.html">
            
                <a href="../python/etl.html">
            
                    
                    数据处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.2.3" data-path="../python/train.html">
            
                <a href="../python/train.html">
            
                    
                    模型训练
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.2.4" data-path="../python/pyjava.html">
            
                <a href="../python/pyjava.html">
            
                    
                    PyJava API简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.2.5" data-path="../python/read_excel.html">
            
                <a href="../python/read_excel.html">
            
                    
                    结合Python读取Excel
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.2.6" data-path="../python/write_excel.html">
            
                <a href="../python/write_excel.html">
            
                    
                    结合Python保存Excel
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.2.7" data-path="../python/resource.html">
            
                <a href="../python/resource.html">
            
                    
                    K8s下的Python资源限制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.2.8" data-path="../python/datamode.html">
            
                <a href="../python/datamode.html">
            
                    
                    dataMode 详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.2.9" data-path="../python/py_paralell.html">
            
                <a href="../python/py_paralell.html">
            
                    
                    Python并行度你所需要知道的
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.4.3" data-path="../algs/">
            
                <a href="../algs/">
            
                    
                    MLSQL内置算法
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.4.3.1" data-path="../algs/kmeans.html">
            
                <a href="../algs/kmeans.html">
            
                    
                    KMeans
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.3.2" data-path="../algs/naive_bayes.html">
            
                <a href="../algs/naive_bayes.html">
            
                    
                    NaiveBayes
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.3.3" data-path="../algs/als.html">
            
                <a href="../algs/als.html">
            
                    
                    ALS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.3.4" data-path="../algs/random_forest.html">
            
                <a href="../algs/random_forest.html">
            
                    
                    RandomForest
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.3.5" data-path="../algs/lda.html">
            
                <a href="../algs/lda.html">
            
                    
                    LDA
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.3.6" data-path="../algs/xgboost.html">
            
                <a href="../algs/xgboost.html">
            
                    
                    XGBoost
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.4.4" data-path="../dl/">
            
                <a href="../dl/">
            
                    
                    基于Java的深度学习框架集成
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.4.4.1" data-path="../dl/load_image.html">
            
                <a href="../dl/load_image.html">
            
                    
                    加载图片数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.4.2" data-path="../dl/cifar10.html">
            
                <a href="../dl/cifar10.html">
            
                    
                    Cifar10示例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.4.5" data-path="../api_deploy/">
            
                <a href="../api_deploy/">
            
                    
                    部署算法API服务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.4.5.1" data-path="../api_deploy/design.html">
            
                <a href="../api_deploy/design.html">
            
                    
                    设计和原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4.5.2" data-path="../api_deploy/case.html">
            
                <a href="../api_deploy/case.html">
            
                    
                    部署流程
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="../udf/">
            
                <a href="../udf/">
            
                    
                    MLSQL动态创建UDF/UDAF
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.5.1" data-path="../udf/python_udf.html">
            
                <a href="../udf/python_udf.html">
            
                    
                    Python UDF
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.5.2" data-path="../udf/scala_udf.html">
            
                <a href="../udf/scala_udf.html">
            
                    
                    Scala UDF
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.5.3" data-path="../udf/scala_udaf.html">
            
                <a href="../udf/scala_udaf.html">
            
                    
                    Scala UDAF
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.5.4" data-path="../udf/java_udf.html">
            
                <a href="../udf/java_udf.html">
            
                    
                    Java UDF
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">安全与隐私</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="../security/sum.html">
            
                <a href="../security/sum.html">
            
                    
                    安全与隐私
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1.1" data-path="../security/">
            
                <a href="../security/">
            
                    
                    MLSQL Engine 接口访问控制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1.1.1" data-path="../security/token_control.html">
            
                <a href="../security/token_control.html">
            
                    
                    接口访问Token设置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.1.2" data-path="../security/custom_control.html">
            
                <a href="../security/custom_control.html">
            
                    
                    自定义接口访问策略
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.1.2" data-path="../security/sum2.html">
            
                <a href="../security/sum2.html">
            
                    
                    授权用户对数据的访问控制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1.2.1" data-path="../security/compile_time.html">
            
                <a href="../security/compile_time.html">
            
                    
                    解析时表权限
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.2.2" data-path="../security/runtime_time.html">
            
                <a href="../security/runtime_time.html">
            
                    
                    运行时表/列权限
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">性能与资源</li>
        
        
    
        <li class="chapter " data-level="7.1" data-path="../resources/dynamic_resource.html">
            
                <a href="../resources/dynamic_resource.html">
            
                    
                    动态资源调整
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">插件/API/商店</li>
        
        
    
        <li class="chapter " data-level="8.1" data-path="../store/">
            
                <a href="../store/">
            
                    
                    MLSQL 脚本商店和插件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1.1" data-path="../store/save_excel.html">
            
                <a href="../store/save_excel.html">
            
                    
                    脚本插件save_excel
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.2" data-path="../plugin/">
            
                <a href="../plugin/">
            
                    
                    MLSQL Engine插件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1.2.1" data-path="../plugin/online_install.html">
            
                <a href="../plugin/online_install.html">
            
                    
                    网络安装插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.2.2" data-path="../plugin/offline_install.html">
            
                <a href="../plugin/offline_install.html">
            
                    
                    离线安装插件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8.2" data-path="../api/sum.html">
            
                <a href="../api/sum.html">
            
                    
                    API on（Console/Engine）介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.2.1" data-path="../developer/">
            
                <a href="../developer/">
            
                    
                    MLSQL Console API指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.2.1.1" data-path="../developer/script_api.html">
            
                <a href="../developer/script_api.html">
            
                    
                    脚本获取接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.2.1.2" data-path="../developer/script_run_api.html">
            
                <a href="../developer/script_run_api.html">
            
                    
                    脚本执行代理接口
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8.2.2" data-path="../api/README.md">
            
                <span>
            
                    
                    MLSQL Engine Rest接口详解
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.2.2.1" data-path="../api/run-script.html">
            
                <a href="../api/run-script.html">
            
                    
                    脚本执行接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.2.2.2" data-path="../api/code_suggest.html">
            
                <a href="../api/code_suggest.html">
            
                    
                    代码提示接口
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8.2.3" data-path="../resources/liveness.html">
            
                <a href="../resources/liveness.html">
            
                    
                    MLSQL Engine Liveness探针
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.2.4" data-path="../resources/readiness.html">
            
                <a href="../resources/readiness.html">
            
                    
                    MLSQL Engine Readness探针
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="9.1" data-path="../qa/">
            
                <a href="../qa/">
            
                    
                    常见问题
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1.1" data-path="../qa/upload_file.html">
            
                <a href="../qa/upload_file.html">
            
                    
                    文件上传失败怎么办
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.2" data-path="../qa/home.html">
            
                <a href="../qa/home.html">
            
                    
                    个人主目录是个啥
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.3" data-path="../qa/session_isolated.html">
            
                <a href="../qa/session_isolated.html">
            
                    
                    会话隔离/并发执行/调试执行/定时任务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.4" data-path="../qa/cdh_hdp.html">
            
                <a href="../qa/cdh_hdp.html">
            
                    
                    CDH/HDP 怎么运行MLSQL Engine
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.5" data-path="../qa/debug_log.html">
            
                <a href="../qa/debug_log.html">
            
                    
                    排查错误，三个系统的日志你都要看
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.6" data-path="../qa/mlsql_cluster.html">
            
                <a href="../qa/mlsql_cluster.html">
            
                    
                    听说mlsql-cluster暂时不更新了，mlsql-cluster是个啥？
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.7" data-path="../qa/mlsql-docker-image.html">
            
                <a href="../qa/mlsql-docker-image.html">
            
                    
                    MLSQL K8s部署，镜像环境如何制作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.8" >
            
                <a target="_blank" href="https://zhuanlan.zhihu.com/p/138405931">
            
                    
                    写SQL如何避免拷贝黏贴
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.9" >
            
                <a target="_blank" href="https://zhuanlan.zhihu.com/p/138475580">
            
                    
                    如何将SQL封装成命令调用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.10" data-path="../qa/load_jdbc.html">
            
                <a href="../qa/load_jdbc.html">
            
                    
                    加载JDBC(如MySQL，Oracle)数据常见困惑
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="9.2" >
            
                <span>
            
                    
                    最佳实践
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">开发者指南</li>
        
        
    
        <li class="chapter " data-level="10.1" data-path="../dev_guide/engine/">
            
                <a href="../dev_guide/engine/">
            
                    
                    MLSQL Engine开发环境设置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.1.1" data-path="../dev_guide/engine/spark_2_4_3.html">
            
                <a href="../dev_guide/engine/spark_2_4_3.html">
            
                    
                    Spark 2.4.3开发环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.1.2" data-path="../dev_guide/engine/spark_3_0_0.html">
            
                <a href="../dev_guide/engine/spark_3_0_0.html">
            
                    
                    Spark 3.0.0开发环境
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.2" data-path="../dev_guide/engine/plugin/ET_README.html">
            
                <a href="../dev_guide/engine/plugin/ET_README.html">
            
                    
                    ET插件开发
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.2.1" data-path="../dev_guide/engine/plugin/et.html">
            
                <a href="../dev_guide/engine/plugin/et.html">
            
                    
                    ET插件开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.2.2" data-path="../dev_guide/engine/plugin/et_command.html">
            
                <a href="../dev_guide/engine/plugin/et_command.html">
            
                    
                    命令行开发
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.3" data-path="../dev_guide/engine/plugin/OTHER_README.html">
            
                <a href="../dev_guide/engine/plugin/OTHER_README.html">
            
                    
                    其他插件开发
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.3.1" data-path="../dev_guide/engine/plugin/ds.html">
            
                <a href="../dev_guide/engine/plugin/ds.html">
            
                    
                    自定义数据源插件开发
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">附录</li>
        
        
    
        <li class="chapter " data-level="11.1" data-path="../extra/commands.html">
            
                <a href="../extra/commands.html">
            
                    
                    常见宏命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="11.2" >
            
                <span>
            
                    
                    附录二：
            
                </span>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >常见函数</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><ul><li><span class="title-icon "></span><a href="#&#x5E38;&#x89C1;&#x51FD;&#x6570;"><b></b>&#x5E38;&#x89C1;&#x51FD;&#x6570;</a></li><ul><li><span class="title-icon "></span><a href="#sleep"><b></b>sleep</a></li><li><span class="title-icon "></span><a href="#uuid"><b></b>uuid</a></li><li><span class="title-icon "></span><a href="#matrixarray"><b></b>matrix_array</a></li><li><span class="title-icon "></span><a href="#vecargmax"><b></b>vec_argmax</a></li><li><span class="title-icon "></span><a href="#vecdense"><b></b>vec_dense</a></li><li><span class="title-icon "></span><a href="#vecsparse"><b></b>vec_sparse</a></li><li><span class="title-icon "></span><a href="#vecconcat"><b></b>vec_concat</a></li><li><span class="title-icon "></span><a href="#veccosine"><b></b>vec_cosine</a></li><li><span class="title-icon "></span><a href="#vecslice"><b></b>vec_slice</a></li><li><span class="title-icon "></span><a href="#vecarray"><b></b>vec_array</a></li><li><span class="title-icon "></span><a href="#vecmkstring"><b></b>vec_mk_string</a></li><li><span class="title-icon "></span><a href="#vecwisemul"><b></b>vec_wise_mul</a></li><li><span class="title-icon "></span><a href="#vecwiseadd"><b></b>vec_wise_add</a></li><li><span class="title-icon "></span><a href="#vecwisedif"><b></b>vec_wise_dif</a></li><li><span class="title-icon "></span><a href="#vecwisemod"><b></b>vec_wise_mod</a></li><li><span class="title-icon "></span><a href="#vecinplaceadd"><b></b>vec_inplace_add</a></li><li><span class="title-icon "></span><a href="#vecinplaceewmul"><b></b>vec_inplace_ew_mul</a></li><li><span class="title-icon "></span><a href="#vecceil"><b></b>vec_ceil</a></li><li><span class="title-icon "></span><a href="#vecfloor"><b></b>vec_floor</a></li><li><span class="title-icon "></span><a href="#vecmean"><b></b>vec_mean</a></li><li><span class="title-icon "></span><a href="#vecstddev"><b></b>vec_stddev</a></li><li><span class="title-icon "></span><a href="#ngram"><b></b>ngram</a></li><li><span class="title-icon "></span><a href="#arrayintersect"><b></b>array_intersect</a></li><li><span class="title-icon "></span><a href="#arrayindex"><b></b>array_index</a></li><li><span class="title-icon "></span><a href="#arrayslice"><b></b>array_slice</a></li><li><span class="title-icon "></span><a href="#arraynumberconcat"><b></b>array_number_concat</a></li><li><span class="title-icon "></span><a href="#arrayconcat"><b></b>array_concat</a></li><li><span class="title-icon "></span><a href="#arraynumbertostring"><b></b>array_number_to_string</a></li><li><span class="title-icon "></span><a href="#arraystringtodouble"><b></b>array_string_to_double</a></li><li><span class="title-icon "></span><a href="#arraystringtofloat"><b></b>array_string_to_float</a></li><li><span class="title-icon "></span><a href="#arraystringtoint"><b></b>array_string_to_int</a></li><li><span class="title-icon "></span><a href="#matrixdense"><b></b>matrix_dense</a></li><li><span class="title-icon "></span><a href="#matrixsum"><b></b>matrix_sum</a></li><li><span class="title-icon "></span><a href="#keepchinese"><b></b>keepChinese</a></li><li><span class="title-icon "></span><a href="#&#x5EA6;&#x91CF;&#x51FD;&#x6570;"><b></b>&#x5EA6;&#x91CF;&#x51FD;&#x6570;</a></li></ul></ul></ul></div><h2 id="&#x5E38;&#x89C1;&#x51FD;&#x6570;"><a name="&#x5E38;&#x89C1;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#&#x5E38;&#x89C1;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5E38;&#x89C1;&#x51FD;&#x6570;</h2>
<h3 id="sleep"><a name="sleep" class="anchor-navigation-ex-anchor" href="#sleep"><i class="fa fa-link" aria-hidden="true"></i></a>sleep</h3>
<p>&#x4F11;&#x7720;&#x51FD;&#x6570;&#xFF0C;&#x65B9;&#x4FBF;&#x8C03;&#x8BD5;&#x3002;</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- &#x4F11;&#x7720;1s</span>
<span class="hljs-keyword">select</span> <span class="hljs-keyword">sleep</span>(<span class="hljs-number">1000</span>)
</code></pre>
<h3 id="uuid"><a name="uuid" class="anchor-navigation-ex-anchor" href="#uuid"><i class="fa fa-link" aria-hidden="true"></i></a>uuid</h3>
<p>&#x4EA7;&#x751F;&#x4E00;&#x4E2A;&#x552F;&#x4E00;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x53BB;&#x6389;&#x4E86;&quot;-&quot;</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- &#x4F11;&#x7720;1s</span>
<span class="hljs-keyword">select</span> <span class="hljs-keyword">uuid</span>()
</code></pre>
<p>&#x4F7F;&#x7528;&#x573A;&#x666F;&#x5982;&#x751F;&#x6210;&#x4E00;&#x5F20;&#x968F;&#x673A;&#x8868;&#xFF1A;</p>
<pre><code>set table = `select uuid()` options type=&quot;sql&quot;;
</code></pre><h3 id="matrixarray"><a name="matrixarray" class="anchor-navigation-ex-anchor" href="#matrixarray"><i class="fa fa-link" aria-hidden="true"></i></a>matrix_array</h3>
<p>&#x77E9;&#x9635;&#x8F6C;&#x6570;&#x7EC4;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> matrix_array(array_onehot(<span class="hljs-built_in">array</span>(<span class="hljs-number">1</span>,<span class="hljs-number">2</span>),<span class="hljs-number">12</span>))
</code></pre>
<h3 id="vecargmax"><a name="vecargmax" class="anchor-navigation-ex-anchor" href="#vecargmax"><i class="fa fa-link" aria-hidden="true"></i></a>vec_argmax</h3>
<p>&#x627E;&#x5230;&#x5411;&#x91CF;&#x91CC;&#x9762;&#x6700;&#x5927;&#x503C;&#x6240;&#x5728;&#x7684;&#x4F4D;&#x7F6E;&#x3002;</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- &#x4F11;&#x7720;1s</span>
<span class="hljs-keyword">select</span> vec_argmax(vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>,<span class="hljs-number">2.0</span>,<span class="hljs-number">7.0</span>))) <span class="hljs-keyword">as</span> label
</code></pre>
<h3 id="vecdense"><a name="vecdense" class="anchor-navigation-ex-anchor" href="#vecdense"><i class="fa fa-link" aria-hidden="true"></i></a>vec_dense</h3>
<p>&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x7D27;&#x51D1;&#x5411;&#x91CF;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>,<span class="hljs-number">2.0</span>,<span class="hljs-number">7.0</span>))
</code></pre>
<h3 id="vecsparse"><a name="vecsparse" class="anchor-navigation-ex-anchor" href="#vecsparse"><i class="fa fa-link" aria-hidden="true"></i></a>vec_sparse</h3>
<p>&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x7A00;&#x758F;&#x5411;&#x91CF;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_sparse(<span class="hljs-number">2</span>,<span class="hljs-comment">--&#x6B64;&#x5904;&#x4F20;&#x9012;&#x4E00;&#x4E2A;map)</span>
</code></pre>
<h3 id="vecconcat"><a name="vecconcat" class="anchor-navigation-ex-anchor" href="#vecconcat"><i class="fa fa-link" aria-hidden="true"></i></a>vec_concat</h3>
<p>&#x62FC;&#x63A5;&#x591A;&#x4E2A;&#x5411;&#x91CF;&#x6210;&#x4E3A;&#x4E00;&#x4E2A;&#x5411;&#x91CF;</p>
<pre><code class="lang-sql"> <span class="hljs-keyword">select</span> vec_concat(
     <span class="hljs-built_in">array</span>(
     vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>)),
     vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>))
     )
 )
</code></pre>
<h3 id="veccosine"><a name="veccosine" class="anchor-navigation-ex-anchor" href="#veccosine"><i class="fa fa-link" aria-hidden="true"></i></a>vec_cosine</h3>
<p>&#x8BA1;&#x7B97;consine &#x5411;&#x91CF;&#x5939;&#x89D2;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_cosine(vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>,<span class="hljs-number">2.0</span>)),vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>,<span class="hljs-number">1.0</span>)))
</code></pre>
<h3 id="vecslice"><a name="vecslice" class="anchor-navigation-ex-anchor" href="#vecslice"><i class="fa fa-link" aria-hidden="true"></i></a>vec_slice</h3>
<p>&#x5207;&#x5272;vector:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_slice(vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>,<span class="hljs-number">2.0</span>,<span class="hljs-number">3.0</span>)),<span class="hljs-built_in">array</span>(<span class="hljs-number">0</span>,<span class="hljs-number">1</span>))
</code></pre>
<h3 id="vecarray"><a name="vecarray" class="anchor-navigation-ex-anchor" href="#vecarray"><i class="fa fa-link" aria-hidden="true"></i></a>vec_array</h3>
<p>&#x628A;&#x5411;&#x91CF;&#x8F6C;&#x5316;&#x4E3A;&#x6570;&#x7EC4;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_array(vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>,<span class="hljs-number">2.0</span>)))
</code></pre>
<h3 id="vecmkstring"><a name="vecmkstring" class="anchor-navigation-ex-anchor" href="#vecmkstring"><i class="fa fa-link" aria-hidden="true"></i></a>vec_mk_string</h3>
<p>&#x628A;&#x5411;&#x91CF;&#x8FDB;&#x884C;&#x62FC;&#x63A5;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_mk_string(vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>,<span class="hljs-number">2.0</span>)))
</code></pre>
<h3 id="vecwisemul"><a name="vecwisemul" class="anchor-navigation-ex-anchor" href="#vecwisemul"><i class="fa fa-link" aria-hidden="true"></i></a>vec_wise_mul</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">1.0</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f <span class="hljs-keyword">as</span> <span class="hljs-keyword">data</span>;
<span class="hljs-keyword">select</span> vec_wise_mul(f, f) <span class="hljs-keyword">as</span> nf <span class="hljs-keyword">from</span> <span class="hljs-keyword">data</span>;
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;nf&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">6.25</span>,
                <span class="hljs-number">4.0</span>,
                <span class="hljs-number">1.0</span>
            ]
        }
    }
]
</code></pre>
<h3 id="vecwiseadd"><a name="vecwiseadd" class="anchor-navigation-ex-anchor" href="#vecwiseadd"><i class="fa fa-link" aria-hidden="true"></i></a>vec_wise_add</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">1.0</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f <span class="hljs-keyword">as</span> <span class="hljs-keyword">data</span>;
<span class="hljs-keyword">select</span> vec_wise_add(f, f) <span class="hljs-keyword">as</span> nf <span class="hljs-keyword">from</span> <span class="hljs-keyword">data</span>;
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;nf&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">5.0</span>,
                <span class="hljs-number">4.0</span>,
                <span class="hljs-number">2.0</span>
            ]
        }
    }
]
</code></pre>
<h3 id="vecwisedif"><a name="vecwisedif" class="anchor-navigation-ex-anchor" href="#vecwisedif"><i class="fa fa-link" aria-hidden="true"></i></a>vec_wise_dif</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">1.0</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f1, vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">22.2</span>, <span class="hljs-number">1.6</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f2 <span class="hljs-keyword">as</span> <span class="hljs-keyword">data</span>;
<span class="hljs-keyword">select</span> vec_wise_dif(f1, f2) <span class="hljs-keyword">as</span> nf <span class="hljs-keyword">from</span> <span class="hljs-keyword">data</span>;
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;nf&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">0.0</span>,
                <span class="hljs-number">-20.2</span>,
                <span class="hljs-number">-0.6000000000000001</span>
            ]
        }
    }
]
</code></pre>
<h3 id="vecwisemod"><a name="vecwisemod" class="anchor-navigation-ex-anchor" href="#vecwisemod"><i class="fa fa-link" aria-hidden="true"></i></a>vec_wise_mod</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">1.0</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f1, vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">4.0</span>, <span class="hljs-number">3.0</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f2 <span class="hljs-keyword">as</span> <span class="hljs-keyword">data</span>;
<span class="hljs-keyword">select</span> vec_wise_mod(f1, f2) <span class="hljs-keyword">as</span> nf <span class="hljs-keyword">from</span> <span class="hljs-keyword">data</span>;
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;nf&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">0.0</span>,
                <span class="hljs-number">2.0</span>,
                <span class="hljs-number">1.0</span>
            ]
        }
    }
]
</code></pre>
<h3 id="vecinplaceadd"><a name="vecinplaceadd" class="anchor-navigation-ex-anchor" href="#vecinplaceadd"><i class="fa fa-link" aria-hidden="true"></i></a>vec_inplace_add</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">1.0</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f <span class="hljs-keyword">as</span> <span class="hljs-keyword">data</span>;
<span class="hljs-keyword">select</span> vec_inplace_add(f, <span class="hljs-number">4.4</span>) <span class="hljs-keyword">as</span> nf <span class="hljs-keyword">from</span> <span class="hljs-keyword">data</span>;
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;nf&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">6.9</span>,
                <span class="hljs-number">6.4</span>,
                <span class="hljs-number">5.4</span>
            ]
        }
    }
]
</code></pre>
<h3 id="vecinplaceewmul"><a name="vecinplaceewmul" class="anchor-navigation-ex-anchor" href="#vecinplaceewmul"><i class="fa fa-link" aria-hidden="true"></i></a>vec_inplace_ew_mul</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">1.0</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f <span class="hljs-keyword">as</span> <span class="hljs-keyword">data</span>;
<span class="hljs-keyword">select</span> vec_inplace_ew_mul(f, <span class="hljs-number">4.4</span>) <span class="hljs-keyword">as</span> nf <span class="hljs-keyword">from</span> <span class="hljs-keyword">data</span>;
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;nf&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">11.0</span>,
                <span class="hljs-number">8.8</span>,
                <span class="hljs-number">4.4</span>
            ]
        }
    }
]
</code></pre>
<h3 id="vecceil"><a name="vecceil" class="anchor-navigation-ex-anchor" href="#vecceil"><i class="fa fa-link" aria-hidden="true"></i></a>vec_ceil</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">2.4</span>, <span class="hljs-number">1.6</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f <span class="hljs-keyword">as</span> <span class="hljs-keyword">data</span>;
<span class="hljs-keyword">select</span> vec_ceil(f) <span class="hljs-keyword">as</span> nf <span class="hljs-keyword">from</span> <span class="hljs-keyword">data</span>;
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;nf&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">3.0</span>,
                <span class="hljs-number">3.0</span>,
                <span class="hljs-number">2.0</span>
            ]
        }
    }
]
</code></pre>
<h3 id="vecfloor"><a name="vecfloor" class="anchor-navigation-ex-anchor" href="#vecfloor"><i class="fa fa-link" aria-hidden="true"></i></a>vec_floor</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_dense(<span class="hljs-keyword">cast</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">2.5</span>, <span class="hljs-number">2.4</span>, <span class="hljs-number">1.6</span>) <span class="hljs-keyword">as</span> <span class="hljs-built_in">array</span>&lt;<span class="hljs-keyword">double</span>&gt;)) <span class="hljs-keyword">as</span> f <span class="hljs-keyword">as</span> <span class="hljs-keyword">data</span>;
<span class="hljs-keyword">select</span> vec_floor(f) <span class="hljs-keyword">as</span> nf <span class="hljs-keyword">from</span> <span class="hljs-keyword">data</span>;
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;nf&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">2.0</span>,
                <span class="hljs-number">2.0</span>,
                <span class="hljs-number">1.0</span>
            ]
        }
    }
]
</code></pre>
<h3 id="vecmean"><a name="vecmean" class="anchor-navigation-ex-anchor" href="#vecmean"><i class="fa fa-link" aria-hidden="true"></i></a>vec_mean</h3>
<p>&#x5411;&#x91CF;&#x5E73;&#x5747;&#x503C;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_mean(vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>,<span class="hljs-number">2.0</span>,<span class="hljs-number">7.0</span>, <span class="hljs-number">2.0</span>)))
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;UDF:vec_mean(UDF:vec_dense(cast(array(1.0, 2.0, 7.0, 2.0) as array&lt;double&gt;)))&quot;</span>: <span class="hljs-number">3.0</span>
    }
]
</code></pre>
<h3 id="vecstddev"><a name="vecstddev" class="anchor-navigation-ex-anchor" href="#vecstddev"><i class="fa fa-link" aria-hidden="true"></i></a>vec_stddev</h3>
<p>&#x5411;&#x91CF;&#x6807;&#x51C6;&#x5DEE;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> vec_stddev(vec_dense(<span class="hljs-built_in">array</span>(<span class="hljs-number">3.0</span>, <span class="hljs-number">4.0</span>, <span class="hljs-number">5.0</span>)))
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;UDF:vec_stddev(UDF:vec_dense(cast(array(3.0, 4.0, 5.0) as array&lt;double&gt;)))&quot;</span>: <span class="hljs-number">1.0</span>
    }
]
</code></pre>
<h3 id="ngram"><a name="ngram" class="anchor-navigation-ex-anchor" href="#ngram"><i class="fa fa-link" aria-hidden="true"></i></a>ngram</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> ngram(<span class="hljs-built_in">array</span>(<span class="hljs-string">&quot;a&quot;</span>,<span class="hljs-string">&quot;b&quot;</span>,<span class="hljs-string">&quot;c&quot;</span>,<span class="hljs-string">&quot;d&quot;</span>,<span class="hljs-string">&quot;e&quot;</span>),<span class="hljs-number">3</span>) <span class="hljs-keyword">as</span> <span class="hljs-number">3</span>ngr
</code></pre>
<h3 id="arrayintersect"><a name="arrayintersect" class="anchor-navigation-ex-anchor" href="#arrayintersect"><i class="fa fa-link" aria-hidden="true"></i></a>array_intersect</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> array_intersect(<span class="hljs-built_in">array</span>(<span class="hljs-string">&quot;a&quot;</span>,<span class="hljs-string">&quot;b&quot;</span>,<span class="hljs-string">&quot;c&quot;</span>,<span class="hljs-string">&quot;d&quot;</span>,<span class="hljs-string">&quot;e&quot;</span>),<span class="hljs-built_in">array</span>(<span class="hljs-string">&quot;a&quot;</span>)) <span class="hljs-keyword">as</span> k
</code></pre>
<h3 id="arrayindex"><a name="arrayindex" class="anchor-navigation-ex-anchor" href="#arrayindex"><i class="fa fa-link" aria-hidden="true"></i></a>array_index</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> array_index(<span class="hljs-built_in">array</span>(<span class="hljs-string">&quot;a&quot;</span>,<span class="hljs-string">&quot;b&quot;</span>,<span class="hljs-string">&quot;c&quot;</span>,<span class="hljs-string">&quot;d&quot;</span>,<span class="hljs-string">&quot;e&quot;</span>),<span class="hljs-string">&quot;b&quot;</span>) <span class="hljs-keyword">as</span> k
</code></pre>
<h3 id="arrayslice"><a name="arrayslice" class="anchor-navigation-ex-anchor" href="#arrayslice"><i class="fa fa-link" aria-hidden="true"></i></a>array_slice</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> array_slice(<span class="hljs-built_in">array</span>(<span class="hljs-string">&quot;a&quot;</span>,<span class="hljs-string">&quot;b&quot;</span>,<span class="hljs-string">&quot;c&quot;</span>,<span class="hljs-string">&quot;d&quot;</span>,<span class="hljs-string">&quot;e&quot;</span>),<span class="hljs-number">3</span>,<span class="hljs-number">-1</span>) <span class="hljs-keyword">as</span> k
</code></pre>
<h3 id="arraynumberconcat"><a name="arraynumberconcat" class="anchor-navigation-ex-anchor" href="#arraynumberconcat"><i class="fa fa-link" aria-hidden="true"></i></a>array_number_concat</h3>
<p>&#x591A;&#x4E2A;&#x6570;&#x7EC4;&#x62FC;&#x63A5;&#x6210;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#xFF0C;&#x5E76;&#x4E14;&#x5C55;&#x5F00;&#x3002;&#x6BD4;&#x5982; [[1,2],[2,3]] =&gt; [1,2,2,3]</p>
<h3 id="arrayconcat"><a name="arrayconcat" class="anchor-navigation-ex-anchor" href="#arrayconcat"><i class="fa fa-link" aria-hidden="true"></i></a>array_concat</h3>
<p>&#x540C;array_number_concat&#xFF0C;&#x652F;&#x6301;&#x5143;&#x7D20;&#x7C7B;&#x578B;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;</p>
<h3 id="arraynumbertostring"><a name="arraynumbertostring" class="anchor-navigation-ex-anchor" href="#arraynumbertostring"><i class="fa fa-link" aria-hidden="true"></i></a>array_number_to_string</h3>
<p>&#x5BF9;&#x6570;&#x7EC4;&#x5185;&#x7684;&#x5143;&#x7D20;&#x505A;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</p>
<h3 id="arraystringtodouble"><a name="arraystringtodouble" class="anchor-navigation-ex-anchor" href="#arraystringtodouble"><i class="fa fa-link" aria-hidden="true"></i></a>array_string_to_double</h3>
<p>&#x5BF9;&#x6570;&#x7EC4;&#x5185;&#x7684;&#x5143;&#x7D20;&#x505A;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</p>
<h3 id="arraystringtofloat"><a name="arraystringtofloat" class="anchor-navigation-ex-anchor" href="#arraystringtofloat"><i class="fa fa-link" aria-hidden="true"></i></a>array_string_to_float</h3>
<p>&#x5BF9;&#x6570;&#x7EC4;&#x5185;&#x7684;&#x5143;&#x7D20;&#x505A;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</p>
<h3 id="arraystringtoint"><a name="arraystringtoint" class="anchor-navigation-ex-anchor" href="#arraystringtoint"><i class="fa fa-link" aria-hidden="true"></i></a>array_string_to_int</h3>
<p>&#x5BF9;&#x6570;&#x7EC4;&#x5185;&#x7684;&#x5143;&#x7D20;&#x505A;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</p>
<hr>
<h3 id="matrixdense"><a name="matrixdense" class="anchor-navigation-ex-anchor" href="#matrixdense"><i class="fa fa-link" aria-hidden="true"></i></a>matrix_dense</h3>
<p>&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x7D27;&#x51D1;&#x77E9;&#x9635;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> matrix_dense(<span class="hljs-built_in">array</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">3.0</span>), <span class="hljs-built_in">array</span>(<span class="hljs-number">2.0</span>, <span class="hljs-number">3.0</span>, <span class="hljs-number">4.0</span>)))
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;UDF:matrix_dense(cast(array(array(1.0, 2.0, 3.0), array(2.0, 3.0, 4.0)) as array&lt;array&lt;double&gt;&gt;))&quot;</span>: {
            <span class="hljs-string">&quot;isTransposed&quot;</span>: <span class="hljs-literal">false</span>,
            <span class="hljs-string">&quot;numCols&quot;</span>: <span class="hljs-number">3</span>,
            <span class="hljs-string">&quot;numRows&quot;</span>: <span class="hljs-number">2</span>,
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">1.0</span>,
                <span class="hljs-number">2.0</span>,
                <span class="hljs-number">2.0</span>,
                <span class="hljs-number">3.0</span>,
                <span class="hljs-number">3.0</span>,
                <span class="hljs-number">4.0</span>
            ]
        }
    }
]
</code></pre>
<h3 id="matrixsum"><a name="matrixsum" class="anchor-navigation-ex-anchor" href="#matrixsum"><i class="fa fa-link" aria-hidden="true"></i></a>matrix_sum</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> matrix_sum(matrix_dense(<span class="hljs-built_in">array</span>(<span class="hljs-built_in">array</span>(<span class="hljs-number">1.0</span>, <span class="hljs-number">2.0</span>, <span class="hljs-number">3.0</span>), <span class="hljs-built_in">array</span>(<span class="hljs-number">2.0</span>, <span class="hljs-number">3.0</span>, <span class="hljs-number">4.0</span>))), <span class="hljs-number">0</span>)
</code></pre>
<pre><code class="lang-json">[
    {
        <span class="hljs-string">&quot;UDF:matrix_sum(UDF:matrix_dense(cast(array(array(1.0, 2.0, 3.0), array(2.0, 3.0, 4.0)) as array&lt;array&lt;double&gt;&gt;)), 0)&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-number">1</span>,
            <span class="hljs-string">&quot;values&quot;</span>: [
                <span class="hljs-number">3.0</span>,
                <span class="hljs-number">5.0</span>,
                <span class="hljs-number">7.0</span>
            ]
        }
    }
]
</code></pre>
<hr>
<h3 id="keepchinese"><a name="keepchinese" class="anchor-navigation-ex-anchor" href="#keepchinese"><i class="fa fa-link" aria-hidden="true"></i></a>keepChinese</h3>
<p>&#x5BF9;&#x6587;&#x672C;&#x5B57;&#x6BB5;&#x505A;&#x5904;&#x7406;&#xFF0C;&#x53EA;&#x4FDD;&#x7559;&#x4E2D;&#x6587;&#x5B57;&#x7B26;</p>
<pre><code>set query = &quot;&#x4F60;&#x25E3;&#x25E2;&#xFE3C;&#x3010;&#x3011;&#x2505;&#x2507;&#x263D;&#x263E;&#x271A;&#x3013;&#x2582;&#x2583;&#x2584;&#x2585;&#x2586;&#x2587;&#x2588;&#x2589;&#x258A;&#x258B;&#x258C;&#x258D;&#x258E;&#x258F;&#x2194;&#x2195;&#x263D;&#x263E;&#x306E;&#xB7;&#x25B8;&#x25C2;&#x25B4;&#x25BE;&#x2508;&#x250A;&#x597D;&#x25E3;&#x25E2;&#xFE3C;&#x3010;&#x3011;&#x2505;&#x2507;&#x263D;&#x263E;&#x271A;&#x3013;&#x2582;&#x2583;&#x2584;&#x2585;&#x2586;&#x2587;&#x2588;&#x2589;&#x258A;&#x258B;&#x258C;&#x258D;&#x258E;&#x258F;&#x2194;&#x2195;&#x263D;&#x263E;&#x306E;&#xB7;&#x25B8;&#x25C2;&#x25B4;&#x25BE;&#x2508;&#x250A;&#x554A;&#xFF0C;..&#x3002;&#xFF0C;&#xFF01;?katty&quot;
select keepChinese(&quot;${query}&quot;,false,array()) as jack 
as chitable
-- &#x7ED3;&#x679C;: &#x4F60;&#x597D;&#x554A;
</code></pre><p>&#x7B2C;&#x4E8C;&#x4E2A;&#x53C2;&#x6570;&#x5982;&#x679C;&#x4E3A;true,&#x5219;&#x4F1A;&#x4FDD;&#x7559;&#x4E00;&#x4E9B;&#x5E38;&#x89C1;&#x7684;&#x6807;&#x70B9;&#x7B26;&#x53F7;&#xFF0C;&#x7B2C;&#x4E09;&#x4E2A;&#x53C2;&#x6570;&#x53EF;&#x4EE5;&#x6307;&#x5B9A;&#x7279;&#x5B9A;&#x54EA;&#x4E9B;&#x5B57;&#x7B26;&#x9700;&#x8981;&#x4FDD;&#x7559;&#x5B57;&#x7B26;&#x3002;</p>
<h3 id="&#x5EA6;&#x91CF;&#x51FD;&#x6570;"><a name="&#x5EA6;&#x91CF;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#&#x5EA6;&#x91CF;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5EA6;&#x91CF;&#x51FD;&#x6570;</h3>
<p>todo</p>
<footer class="page-footer-ex"> <span class="page-footer-ex-copyright">  </span> &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; <span class="page-footer-ex-footer-update"> <i>&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;</i> 2021-01-12 10:27:47 </span> </footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="http.html" class="navigation navigation-prev " aria-label="Previous page: http请求">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../process/" class="navigation navigation-next " aria-label="Next page: 一些有用的内置ET">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"常见函数","level":"5.2.3.2","depth":3,"next":{"title":"一些有用的内置ET","level":"5.2.4","depth":2,"path":"process/README.md","ref":"process/README.md","articles":[{"title":"计算复杂的父子关系","level":"5.2.4.1","depth":3,"path":"process/estimator_transformer/TreeBuildExt.md","ref":"process/estimator_transformer/TreeBuildExt.md","articles":[]},{"title":"改变表的分区数","level":"5.2.4.2","depth":3,"path":"process/estimator_transformer/RepartitionExt.md","ref":"process/estimator_transformer/RepartitionExt.md","articles":[]},{"title":"如何发送邮件","level":"5.2.4.3","depth":3,"path":"process/estimator_transformer/SendMessage.md","ref":"process/estimator_transformer/SendMessage.md","articles":[]},{"title":"数据采集组件mlsql-watcher使用","level":"5.2.4.4","depth":3,"path":"process/estimator_transformer/mlsql-watcher.md","ref":"process/estimator_transformer/mlsql-watcher.md","articles":[]}]},"previous":{"title":"http请求","level":"5.2.3.1","depth":3,"path":"system_udf/http.md","ref":"system_udf/http.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","image-class","lightbox","back-to-top-button","chapter-fold","code","-lunr","-search","search-pro","emphasize","splitter","auto-scroll-table","anchor-navigation-ex","emphasize","alerts","page-footer-ex"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"chapter-fold":{},"emphasize":{},"image-class":{},"page-footer-ex":{"copyright":"","markdown":false,"update_format":"YYYY-MM-DD HH:mm:ss","update_label":"<i>该文件修订时间：</i>"},"splitter":{},"search-pro":{},"auto-scroll-table":{},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"fa fa-hand-o-right","level2Icon":"fa fa-hand-o-right","level3Icon":"fa fa-hand-o-right","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":false,"showLevel":false},"lightbox":{"jquery":true,"sameUuid":false},"back-to-top-button":{},"alerts":{},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"MLSQL Stack 文档","gitbook":"*","description":"MLSQL Stack官方文档"},"file":{"path":"system_udf/vec.md","mtime":"2021-01-12T02:27:47.731Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-02-25T01:29:06.161Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

